home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 0022-3.564 / dmg-0086 / 458.txt < prev    next >
Text File  |  1997-04-16  |  19KB  |  508 lines

  1. =========================================================================
  2.  
  3. INFO-ATARI16 Digest         Wed, 18 Apr 90       Volume 90 : Issue  458
  4.  
  5. Today's Topics:
  6.                           Acc DTA Malloc AES
  7.              FAST ST SPRITES !!!!!!!!!!!!!!!!!!!!!!!!!!!
  8.                       Gemini 1.1 Docs in English
  9.             Help needed with Protobt (XBIOS $12) (2 msgs)
  10.                      INFO-ATARI16 Digest V90 #454
  11.                     in search of a FAST GIF viewer
  12.                             Omega for ST?
  13.           Second request for CX80 Trackball mod information.
  14.                           UUDecode (2 msgs)
  15. ----------------------------------------------------------------------
  16.  
  17. Date: 18 Apr 90 14:27:47 GMT
  18. From:
  19.  zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!dkuug!imada!micro@tut.cis.ohio-state.
  20.  edu  (Claus Pedersen)
  21. Subject: Acc DTA Malloc AES
  22. Message-ID: <734@imada.dk>
  23.  
  24. Dear Atarians;
  25.    I am have here the extract of the anwsers to my questions
  26. concerning ACCs, the DTA and malloc:
  27.  
  28.    - 'fsel_input' can be used without setting the DTA.
  29.    - the size of a file can be found by searching to the end of the
  30.      file.
  31.    - you can use the 'Fsfirst'/'Fsnext' from Accs, by saving the old
  32.      DTA, and then setting your own. Please read letter two...
  33.    - 'Malloc' can't be used from Accs as they are *second class*
  34.      processes, mainly because they don't have a base page.
  35.      This is also the reason why 'Pexec' is rather *unstable* from
  36.      accs. Please read letter one...
  37.  
  38. The two letters following, are answers to :
  39.       sgstree@relay.EU.net       (Samuel Streeper)
  40. both have been send during the easter, but I keep getting a "User
  41. unknown", when I try to send them.
  42.  
  43.    Programs have been tested on my MEGA2 w. tos1.4, my brothers STE
  44. w. tos1.6 and my girlfriends MEGA1 w. german tos1.2.  (I don't have
  45. access to an Atari with tos1.0).
  46.  
  47.  
  48.  
  49. ************************* LETTER ONE ***************************
  50.  
  51.     Thank you for answering my questions. I really need to malloc, as
  52. I am making a text editor.
  53.    It is not really an editor yet, which is why I call it "more". I
  54. have not implemented *all* features of the famous "more" - really it
  55. can only open and view files - no fancy stuff at all.
  56.    The only way to avoid malloc is to make a combined ramdisc and
  57. editor. This will of course not solve the problem of having a very
  58. large chunk of unused memory, but it will be more easy to justify (as
  59. many people are using a large fixed size ramdisc, for various
  60. reasons, of which the least is not the lack of a fixed-multi-
  61. megabyte-device.
  62.  
  63.    I have experimented with the 'active_process'-pointer, and I have
  64. found that it can be used to get the ownership of malloced memory,
  65. and to get a private DTA.
  66.    When using malloc or Fsfirst/Fsnext simply let the
  67. 'active_process' point to the basepage of the acc. It works and why
  68. shouldn't it? - Malloc uses the pointer to stamp the memory blocks,
  69. and Basepage allways points to the DTA of choice.
  70.  
  71. _It really works with both 'Fsfirst' and 'Malloc'._
  72.  
  73. I use the following code :
  74.  
  75.     /*****************************************/
  76.     /* Hacks to do what allready is possible */
  77.     /*****************************************/
  78.     extern SYSHDR *Sysbase;
  79.     extern BASPAG *_BasPag;
  80.     BASPAG *OldPD;
  81.  
  82.     void UseMyBase(void)
  83.     ?
  84.        OldPD = *Sysbase->_run;
  85.        *Sysbase->_run = _BasPag;
  86.     ?
  87.  
  88.     void UseOldBase(void)
  89.     ?
  90.        *Sysbase->_run = OldPD;
  91.     ?
  92.  
  93. It is very simple to use, the DTA has to be set one time only:
  94.  
  95.     main()
  96.     ?
  97.     ...
  98.         UseMyBase();
  99.         Fsetdta(&FileInfo);
  100.         UseOldBase();
  101.     ...
  102.     ?
  103.  
  104. And here is the interesting part of the 'open file' :
  105.  
  106.     if (FileSelect(TextPath))
  107.     ?   UseMyBase();
  108.         Err = Fsfirst(TextPath, 0);
  109.         ... (no AES calls) ...
  110.         Text.Document = Malloc( FileInfo.d_length + Epsilon );
  111.         UseOldBase();
  112.         ...
  113.     ?
  114.  
  115. I didn't want to reenvent the wheel, but I think I just have...
  116. -don't tell me nobody have ever tried to do this before.
  117.    There will be problems if the dispatcher ever runs on a different
  118. scheme (say time sliced). If that ever happens this hack will be in
  119. deep trouble (and so will your suggestion about saving DTA, setting,
  120. using and restoring it)
  121.  
  122.       old = Fgetdta();
  123.       Fsetdta(new);
  124.       ... do funny things ...
  125.       /* if the dispatcher ever runs here, there will be trouble -
  126.          the sky will spit fire, the earth will open and file
  127.          searches will fail...
  128.       */
  129.       Fsetdta(old);
  130.  
  131.    However, notice that if the dispatcher was common to both the AES
  132. and GEMDOS there would be no trouble (as there is now). The
  133. dispatcher only needs to update the 'Active_Process' (of GEMDOS
  134. fame), so that it _always_ points to the basepage of the running
  135. process.
  136.    As to my experiment with AC_CLOSE :
  137.  
  138. >      case AC_CLOSE:
  139. >         Cconws("acc closed");
  140. >         Cconin();
  141. >         form_alert(1,"[1][|Closed][OK]");
  142. >      break;
  143.  
  144.    What happened was that "acc closed" appeared on the screen before
  145. the application had terminated!, then the desktop was opened (lots of
  146. AES calls), and then the alert box "closed".
  147.    It appears that there is a fixed number of 'free' AES calls, just
  148. after the application is started, and that the dispatcher runs before
  149. AES calls. More interesting it seems that some programs uses the AES
  150. _after_ 'Pterm'! - handy to close windows and restore the desktree -
  151. with the 'etv_term' vektor I guess. This has the added bonus that
  152. windows are closed and the desktree gets restored - even when the
  153. program terminates abnormal (with those cute bombs).
  154.  
  155.  
  156. Please let me hear any comments
  157.  
  158. -micro@imada.dk      (Klaus Pedersen).
  159.  
  160.  
  161.  
  162.  
  163. ************************* LETTER TWO ***************************
  164.  
  165.  
  166.     What a bummer, Sorry.
  167.  
  168. In my last letter I wrote :
  169. >          More interesting it seems that some programs uses the AES
  170. >_after_ 'Pterm'!
  171.  
  172.     What a bummer - as it is 'appl_exit' that sends the 'AC_CLOSE'
  173. message, the only way to get the acc to get the message, before a new
  174. program starts, is to make AES calls _after_ the 'appl_exit'... It
  175. seems that I am not the only one making bummers.
  176.  
  177. Sorry, but I was carried away by the perspectives of having a
  178. 'etv_term' program doing all the cleaning up :
  179. >                 - handy to close windows and restore the desktree -
  180. >    ...   This has the added bonus that windows are closed and
  181. >the desktree gets restored - even when the program terminates
  182. >abnormal ...
  183.  
  184. In fact I have tried to have the exit code in the 'etv_term' chain,
  185. using some code looking like this :
  186.  
  187.         extern void Set_etv_term(void *a);
  188.         extern void (*Old_etv_term)(void);
  189.  
  190.         void Close( void )
  191.         ?int wind;
  192.             wind = Text.WindId;
  193.             graf_mouse(M_OFF,0);
  194.             wind_close(wind);
  195.             wind_delete(wind);
  196.             menu_bar(M_tree, ME_HIDE);
  197.             graf_mouse(M_ON, 0);
  198.             rsrc_free();
  199.             v_clsvwk(handle);
  200.             appl_exit();
  201.             (*Old_etv_term)();
  202.         ?
  203.  
  204.         main()
  205.         ?
  206.             Set_etv_term(Close);
  207.             Get_sysbase();
  208.             ...
  209.         ?
  210.  
  211.     And some assembly to do the dirty work, please note that I use
  212. Turbo C, which uses the registers to pass parameters, when nothing
  213. else has been said (An to pointers, Dn to ints, longs) :
  214.  
  215.     include "tos.s"
  216.     export Get_sysbase, Sysbase, Set_etv_term, Old_etv_term
  217.         TEXT
  218.     ****** Set Etv_term pointer ******
  219.     Set_etv_term:
  220.         MOVE.L A0, temp
  221.         PEA get_etv_term
  222.         XBIOS supexec, 6; Call Xbios funktion and dealloc 6 bytes
  223.         RTS
  224.     get_etv_term:
  225.         MOVE.L etv_term, Old_etv_term
  226.         MOVE.L temp, etv_term
  227.         RTS
  228.  
  229.     ****** Get SysBase ******
  230.     Get_sysbase:
  231.         PEA get_sys
  232.         XBIOS supexec, 6
  233.         RTS
  234.     get_sys:
  235.         MOVE.L _sysbase, Sysbase
  236.         RTS
  237.  
  238.         BSS
  239.     temp:         DS.L 1
  240.     Sysbase:      DS.L 1
  241.     Old_etv_term: DS.L 1
  242.  
  243.  
  244.     But the test program bombs out, not these assembly funktions,
  245. they are working. The function 'Close' is called and closes the
  246. window, and then Illustrates the drawback of having code in the
  247. 'etv_term' - it bombs (two bombs), and the bomb routine makes an
  248. 'Pterm(-1)' in TOS1.4 that is, the 'Pterm' calls the 'etv_term'
  249. vektor, where the 'Close' code are, which bombs and so it goes on.
  250.  
  251. Any suggestions ?
  252.  
  253. -micro@imada.dk      (Klaus Pedersen).
  254.  
  255. ------------------------------
  256.  
  257. Date: 18 Apr 90 17:25:31 GMT
  258. From: earthquake.Berkeley.EDU!kawakami@ucbvax.Berkeley.EDU  (John Kawakami)
  259. Subject: FAST ST SPRITES !!!!!!!!!!!!!!!!!!!!!!!!!!!
  260. Message-ID: <35590@ucbvax.BERKELEY.EDU>
  261.  
  262. In article <3143@umbc3.UMBC.EDU> petey@umbc5.umbc.edu () writes:
  263. >
  264. >Hey everyone:
  265. >This one to the ASSEMBLY HACKS out there.
  266. >
  267. >Has anyone written a sprite routine that can beat the Line-A routines
  268. >is the ST?  Without using multiple copies of the sprite offset by 1 pixel
  269. >so that it can be put onto non-byte boundries???
  270. >
  271. >It seems that since the line-a routines are in rom and can be READ faster
  272. >therefor executed faster that this is not possible.  But ive heard people
  273. >claim they can do it.
  274. >
  275. >I would like some psuedo-code or code to do this.
  276. >Code for a monochrome monitor ( 1 BIT PLANE ) would be perferred, just so
  277. >we dont have to mess with the strange way the ST uses 4 bitplanes.
  278. >
  279. >I wrote a routine that put the sprite to the screen byte by byte shifting
  280. >each byte as required.  The line-a  routine was still about 3 times faster
  281. >and my routine only used adds, shifts, and moves.
  282. >
  283. >well, has ANYONE out there done this?
  284.  
  285.  
  286.  
  287.  
  288. I have not done any ST assembly hacking, but one way to speed up writes of
  289. bitmaps is to pre-shift the bitmap and then write it.  For sprites, which
  290. are presumably all the same size or of several fixed sizes, you can just
  291. pre-shift the sprite (8 times once for each bit) and use the lower three
  292. bits as an index into this array of pre-shifted bitmaps.  (GHOD that's turgid)
  293.  
  294. In simple terms that even I would understand: instead of taking the bitmap,
  295. shifting it, and writing it; have it set up so you have to "register" the
  296. bitmap, and return a handle, then pre-shift so you don't have to shift
  297. "on the fly", and handle sprite calls by taking the x,y, and handle.
  298.  
  299. End result: you need to do a bit more pre-processing, but less time is
  300. spent writing to the screen.  Also, you use more memory, but so what!
  301.  
  302.  
  303. John Kawakami       kawakami@earthquake.berkeley.edu
  304.                     ucbvax!earthquake.berkeley.edu!kawakami
  305.                     take-a-right-up-the-hill-then-a-left-on-leroy
  306.  
  307. ------------------------------
  308.  
  309. Date: Wed, 18 Apr 90 11:55:13 MSZ
  310. From: ONM65%DMSWWU1A.BITNET@CUNYVM.CUNY.EDU (Operator Stefan)
  311. Subject: Gemini 1.1 Docs in English
  312. Message-ID: <9004180855.AA24660@hugin.dmswwu-ether>
  313.  
  314. In article <776@ncs.dnd.ca> R. J. Balkwill writes:
  315.  
  316. > I have translated the docs for Gemini 1.1 (Gemini, Venus and Mupfel)
  317. > from German into English but will not post them unless:
  318. >
  319. > a.  There is interest
  320. >
  321. > b.  A few days go by without objection by the authors of Gemini.
  322.  
  323. It is very kind of You to translate the documents. But we have made
  324. an english version of the programs to which the docs should refer.
  325. Also, we found someone in the Netherlands who is now translating the
  326. docs. If you don't mind, please send me the docs, so I can change the
  327. names of the dialogs and menu entries.
  328.  
  329. When we got the english docs, we will beam an english version of
  330. Gemini 1.1 to the world immediately.
  331.  
  332.   _____________________________________________________
  333.  | Stefan Eissing  <onm65@dmswwu1a.bitnet>    +----+  \|#
  334.  | Dorfbauerschaft 7, D-4419 Laer-Holthausen  | OK |   |#
  335.  | "Author of Venus@Gemini"                   +----+   |#
  336.  |_____________________________________________________|#
  337.   #######################################################
  338.  
  339.  
  340.  
  341. ------------------------------
  342.  
  343. Date: 18 Apr 90 10:56:05 GMT
  344. From: mcsun!ukc!harrier.ukc.ac.uk!gos.ukc.ac.uk!shc1@uunet.uu.net  (S.H.Cogheil)
  345. Subject: Help needed with Protobt (XBIOS $12)
  346. Message-ID: <2928@gos.ukc.ac.uk>
  347.  
  348. I am currently trying to write a boot-sector that will make the floppy access
  349.  time 6ms.
  350. However whenever I use the Protobt fucntion I get nothing written to my floppy
  351.  
  352. Will someone please explain how this Bl**dy function works !
  353.  
  354. Sam
  355.  
  356. ------------------------------
  357.  
  358. Date: 18 Apr 90 15:33:30 GMT
  359. From: zaphod.mps.ohio-state.edu!math.lsa.umich.edu!hyc@tut.cis.ohio-state.edu
  360.  (Howard Chu)
  361. Subject: Help needed with Protobt (XBIOS $12)
  362. Message-ID: <11748@stag.math.lsa.umich.edu>
  363.  
  364. In article <2928@gos.ukc.ac.uk> shc1@ukc.ac.uk (S.H.Cogheil) writes:
  365. >I am currently trying to write a boot-sector that will make the floppy access
  366.  time 6ms.
  367. >However whenever I use the Protobt fucntion I get nothing written to my floppy
  368. >
  369. >Will someone please explain how this Bl**dy function works !
  370. >
  371. >Sam
  372.  
  373. Protobt merely generates usable data in the memory buffer you pass it. You
  374. then have to call Flopwrt yourself to get the boot sector written onto the
  375. disk.
  376.  
  377. Btw, how is one supposed to generate a correct checksum for the boot sector?
  378. My impression from reading the description of Protobt is that it completely
  379. overwrites the contents of the buffer you pass it, so you have to make any
  380. changes (adding executable code, altering the parameter block, etc.) after
  381. the call, and most probably ending up with an invalid checksum. Am I missing
  382. something obvious here?
  383. --
  384.   -- Howard Chu @ University of Michigan
  385.  
  386. ------------------------------
  387.  
  388. Date: Wed, 18 Apr 90 10:15 EST
  389. From: SNARK%NRCBSP.NRC.CA@VM.NRC.CA
  390. Subject: INFO-ATARI16 Digest V90 #454
  391.  
  392. Please unsubscribe (time to go home) snark@nrcbsp.nrc.ca
  393.  
  394. ------------------------------
  395.  
  396. Date: 18 Apr 90 14:46:34 GMT
  397. From: orion.oac.uci.edu!uci-ics!gateway@ucsd.edu  (Wayne Ngai)
  398. Subject: in search of a FAST GIF viewer
  399. Message-ID: <262C7DCA.24047@paris.ics.uci.edu>
  400.  
  401. Does anyone has a fast GIF picture viewer for Atari??  If so, please mail
  402. me a copy of it.  I used GIFSHOW, but it's just too slow.   Any of you
  403. familiar with CSHOW gif viewer for IBM??  Anything of that class would
  404. be great!!
  405.  
  406. Wayne
  407.  
  408. wngai@paris.ics.uci.edu
  409.  
  410. ------------------------------
  411.  
  412. Date: 18 Apr 90 17:40:42 GMT
  413. From:
  414.  mailrus!news-server.csri.toronto.edu!utgpu!watserv1!ria!uwovax!7103_2622@tut.ci
  415.  s.ohio-state.edu  (Eric Smith)
  416. Subject: Omega for ST?
  417. Message-ID: <5765.262c6e5a@uwovax.uwo.ca>
  418.  
  419. In article <922@ruunsa.fys.ruu.nl>, muts@fysae.ruu.nl (Peter Mutsaers) writes:
  420. > I would like to know if someone has ported the game of omega to the ST.
  421. > If so, I would like to hear from it. I am trying to translate it myself,
  422. > but have some problems.
  423. I compiled an older version of it with the gcc. Very few changes were
  424. necessary. However, it was a bit slow (using 16 bit integers would help --
  425. perhaps the MS-DOS version of omega would be a better starting point).
  426. It was also quite buggy; again, the fact that it was an older version
  427. may have something to do with this. At any rate, I can strongly recommend
  428. using the gcc for doing any ports of unix software; the library has a lot
  429. of commonly used unix functions, including a non-multitasking fork().
  430. --
  431. Eric R. Smith                     email:
  432. Dept. of Mathematics            ERSMITH@uwovax.uwo.ca
  433. University of Western Ontario   ERSMITH@uwovax.bitnet
  434. London, Ont. Canada N6A 5B7
  435. ph: (519) 661-3638
  436.  
  437. ------------------------------
  438.  
  439. Date: Wed, 18 Apr 90 12:51:24 EDT
  440. From: longj@LONEX.RADC.AF.MIL (Jeffrey K. Long)
  441. Subject: Second request for CX80 Trackball mod information.
  442. Message-ID: <9004181651.AA01076@lonex.radc.af.mil>
  443.  
  444. This is a second plea for info on modifying an ATARI CX80 (thats eight-zero)
  445. trakball to work as a mouse on the ST.  I have an article for the CX22, but
  446. they seem to be totally different beasts!
  447.  
  448. Surely someone must have done this mod before !!?? (and I'm sorry for calling
  449. you all Sirley :-) )
  450.  
  451.  
  452.  
  453. ------------------------------
  454.  
  455. Date: 18 Apr 90 12:44:15 GMT
  456. From: cs.dal.ca!silvert@uunet.uu.net  (Bill Silvert)
  457. Subject: UUDecode
  458. Message-ID: <1990Apr18.124415.19867@cs.dal.ca>
  459.  
  460. In article <9004180507.AA14277@fsucs.cs.fsu.edu> boyd@nu.cs.fsu.edu (Mickey
  461.  Boyd) writes:
  462. >In article <2927@gos.ukc.ac.uk>, anw1@ukc.ac.uk (A.N.Walkeden) writes:
  463. >>I have found a piece of PD software I would like, and have FTP'd it to
  464. >>my machine, where I find it is over 700KBytes in size.
  465. >>Now when I UUDecode this file it produces another output file of similar
  466. >>magnitude, thus there is not enough room for it on a 3.5" disk.
  467. >
  468. >What is the name of the file?  I have never come across that problem, but
  469. >one possible solution (temporary) would be to arc the file on the host
  470. >machine, and then run it from arc on your ST.  I have heard this is
  471. >possible, but I have never done it.
  472.  
  473. Why not just decode it on the host machine?  If it doesn't have
  474. uudecode, then just port uud, for which portable source coude is readily
  475. available (from me, for example).
  476.  
  477.  
  478. --
  479. William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography
  480. P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2.  Tel. (902)426-1577
  481. UUCP=..!?uunet|watmath?!dalcs!biomel!bill
  482. BITNET=bill%biomel%dalcs@dalac  InterNet=bill%biomel@cs.dal.ca
  483.  
  484. ------------------------------
  485.  
  486. Date: 18 Apr 90 16:49:08 GMT
  487. From: samsung!uakari.primate.wisc.edu!larry!gaudi!billm@uunet.uu.net  (Bill
  488.  Mills)
  489. Subject: UUDecode
  490. Message-ID: <1990Apr18.164908.5831@gaudi.CSUFresno.EDU>
  491.  
  492. The best way that I have found to break up large arcs that I uuencode/
  493. decode (since I don't have a hard disk) is to ifng (oops) find someone
  494. with a hard disk.  I have uudecoded files that were too big to fit on
  495. a floppy, then downloaded them to an IBM PC (ugh) at work where I de-arc
  496. them, and then tranfer the files to floppy to use on my ST.  SInce ARC
  497. is the same on MS-DOS as it is for the ST, it makes it that much easier
  498. to find someone with a hard disk (more people with PC systems).  Hope
  499. that helps.
  500.  
  501. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  502. -Bill Mills    Bill@csufres.csufresno.edu  billm@gaudi.csufresno.edu
  503.  
  504. ------------------------------
  505.  
  506. End of INFO-ATARI16 Digest V90 Issue #458
  507. *****************************************
  508.